package com.example.livereplay.common.model.enity;

import java.io.IOException;

public class FFmpegUtils {

    public static Process startPushStream(String ffmpegPath, String inputPath, String audioInputPath, String outputUrl, String videoCodec, String audioCodec, String outputFormat) throws IOException {

        String[] command = {ffmpegPath, "-re", "-i", inputPath, "-c:v", videoCodec, "-c:a", audioCodec, "-f", outputFormat, outputUrl};

        ProcessBuilder processBuilder = new ProcessBuilder(command);
        return processBuilder.start();
    }

}
